package com.wss.module.main.ui.main.mvp;

import com.wss.common.base.mvp.BasePresenter;
import com.wss.common.bean.Template;
import com.wss.common.constants.ARouterConfig;
import com.wss.common.constants.Constants;
import com.wss.common.view.scan.ScanAbility;
import com.wss.module.main.ui.main.mvp.contract.CaseContract;
import com.wss.module.main.ui.main.mvp.model.CaseModel;
import com.wss.module.main.ui.page.*;
import com.wss.module.main.ui.page.flip.CardFlipAbility;
import com.wss.module.main.ui.page.navigation.CityListAbility;
import com.wss.module.main.ui.page.selector.SelectorAbility;
import com.wss.module.main.ui.page.viscosity.ComplexViscositySlideAbility;
import com.wss.module.main.ui.page.viscosity.SimpleViscositySlideAbility;
import com.wss.module.market.ui.main.MarkerMainAbility;

import java.util.ArrayList;
import java.util.List;

/**
 * Describe：案例控制器
 * Created by 吴天强 on 2018/11/20.
 */
public class CasePresenter extends BasePresenter<CaseModel, CaseContract.View> implements CaseContract.Presenter {

    @Override
    protected CaseModel createModule() {
        return new CaseModel(getLifecycleOwner());
    }

    @Override
    public void start() {
        initMenuBlock();
    }

    private void initMenuBlock() {
        //案例模板
        List<Template> list = new ArrayList<>();
        list.add(new Template("商城", MarkerMainAbility.class, "商城模板，本地购物车，商品详情"));
        list.add(new Template("自定义View展览区", CustomViewAbility.class, "一些自定义的View"));
//        list.add(new Template("多功能选择器", SelectorAbility.class, "时间、日期、地址、自定义数据底部弹窗选择器"));
        list.add(new Template("多功能横向Item", MultipleItemAbility.class, "左右文字+Icon的Item  支持右输入框显示"));
        list.add(new Template("多功能对话框", DialogAbility.class, "常用对话框，支持输入框、单按钮、个性化设置等"));
//        list.add(new Template("自定义RadioGroup", RadioGroupAbility.class, "自定义RadioGroup，可以包含任意View内容，如首页Tab带消息角标"));
        list.add(new Template("扫一扫", ScanAbility.class, "扫描二维码，支持自动缩放距离"));
        list.add(new Template("字母导航List", CityListAbility.class, "根据首字母定位到具体的Item，如选择城市右侧导航条 "));
//        list.add(new Template("简单黏性滑动", SimpleViscositySlideAbility.class, "页面滑动，某一个View滑动到顶部固定不动"));
//        list.add(new Template("复杂黏性滑动", ComplexViscositySlideAbility.class, "诸如APP首页，既有上下滑动，也有左右滑动，还需要悬停某一项Item"));
//        list.add(new Template("列表侧滑菜单", SlewedAbility.class, "RecyclerView列表侧滑菜单，如：QQ列表侧滑"));
        list.add(new Template("跑马灯", MarqueeAbility.class, "跑马灯效果，任意View都可以跑起来的那种"));
//        list.add(new Template("卡片翻转", CardFlipAbility.class, "卡片翻转"));

        getView().refreshCaseList(list);
    }

}
